package demo.hms.Reserve.contoller;

import demo.hms.Reserve.service.ReserveService;
import demo.hms.mybatis.entity.Reserve;
import demo.hms.util.Result;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/reserve")
public class ReserveController {
    @Resource
    private ReserveService service;
    // 查询预定信息
    @RequestMapping(value = "/selectReserve", method = RequestMethod.GET)
    public Result selectReserve(Reserve reserve){return service.selectReserve(reserve); }
    // 新增预定信息
    @RequestMapping(value = "/insertReserve", method = RequestMethod.GET)
    public Result insertReserve(Reserve reserve){return service.insertReserve(reserve);}
    // 确定入住
    @RequestMapping(value = "/reserveUpdateLive", method = RequestMethod.GET)
    public Result reserveUpdateLive(Reserve reserve){return service.reserveUpdateLive(reserve);}
    // 取消预定
    @RequestMapping(value = "/cancelReserve", method = RequestMethod.GET)
    public Result cancelReserve(Reserve reserve){return service.cancelReserve(reserve);}
    // 订单作废
    @RequestMapping(value = "/abrogateReserve", method = RequestMethod.GET)
    public Result abrogateReserve(Reserve reserve){return service.abrogateReserve(reserve);}

}
